package com.vnaloha.common.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.vnaloha.common.dao.ProductDAO;
import com.vnaloha.common.model.Product;

@Service
public class ProductServiceImpl implements ProductService{

//private Logger logger = LoggerFactory.getLogger(ProductServiceImpl.class);
	
	@Autowired
	private ProductDAO productDAO;
	
	@Override
	@Transactional
	public List<Product> list() {
		return productDAO.list();
	}
	@Override
	public Product get(int id){
		return productDAO.get(id);
	}
	@Override
	public boolean save(Product product) {
		return productDAO.save(product);
	}
	@Override
	public List<Product> list(int start, int max) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public boolean delete(int id) {
		// TODO Auto-generated method stub
		return false;
	}
	@Override
	public boolean update(Product product) {
		return productDAO.update(product);
	}
	
	

}
